﻿using SqlSugar;
using System;
namespace SoEasyPlatform
{
    /// <summary>
    /// 数据表描述
    /// </summary>
    public class CodeTable
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        public int DbId { get; set; }
        public string ClassName { get; set; }
        public string TableName { get; set; }
        [SugarColumn(IsNullable = true)]
        public string Description { get; set; }
        public DateTime CreateTime { get; set; }
        public DateTime PreUpdateTime { get; set; }
        public DateTime UpdateTime { get; set; }
        /// <summary>
        /// 所属模块，可用于前台数据分类或授权标识
        /// </summary>
        public string Module { get; set; } = "system";
        public bool IsDeleted { get; set; }
        public bool IsLock { get; set; }
    }
    /// <summary>
    /// 数据字段描述
    /// </summary>
    public class CodeColumns
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        public string ClassProperName { get; set; }
        public string DbColumnName { get; set; }
        public bool Required { get; set; }
        public bool IsIdentity { get; set; }
        public bool IsPrimaryKey { get; set; }
        [SugarColumn(IsNullable =true)]
        public string Description { get; set; }
        public string CodeType { get; set; }
        public int CodeTableId { get; set; }
        [SugarColumn(IsNullable =true)]
        public string DefaultValue { get; set; }

    }
}
